//
//  MyRequest.m
//  MyTest
//
//  Created by zhiyou on 16-4-12.
//  Copyright (c) 2016年 wangyang. All rights reserved.
//

#import "MyRequest.h"

@implementation MyRequest

+ (void)getWithURL:(NSString *)URL parameters:(NSDictionary *)dic success:(successBlock)success fail:(failBlock)fail
{
    
    AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
    manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"];
    [manager GET:URL parameters:dic success:^(AFHTTPRequestOperation *operation, id responseObject) {
        success(responseObject);
    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        fail(error);
    }];
    
}








@end
